package com.anjubao.parking.municipal.payment.model;

import com.anjubao.parking.municipal.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 对账单表
 *
 * @author zhuchunfeng
 */
@Getter
@Setter
@TableName("parking_trade_bill")
@ApiModel(value="ParkingTradeBill",description = "对账单表")
public class ParkingTradeBill extends BaseEntity<ParkingTradeBill>{

    @TableId(type = IdType.INPUT)
    @TableField(value="trade_bill_id")
    @ApiModelProperty(name="tradeBillId",value = "对账单ID")
    private Long tradeBillId;

    @TableField(value="trade_bill_code")
    @ApiModelProperty(name="tradeBillCode",value = "对账单ID,生成规则为302(3位)+yyMMddHHmm(10位)+trade_bill_id(19位)")
    private String tradeBillCode;

    @TableField(value="trade_time")
    @ApiModelProperty(name="tradeTime",value = "交易时间")
    private LocalDateTime tradeTime;

    @TableField(value="appid")
    @ApiModelProperty(name="appid",value = "公众账号ID")
    private String appid;

    @TableField(value="mch_id")
    @ApiModelProperty(name="mchId",value = "商户号")
    private String mchId;

    @TableField(value="sub_mch_id")
    @ApiModelProperty(name="subMchId",value = "子商户号")
    private String subMchId;

    @TableField(value="device_info")
    @ApiModelProperty(name="deviceInfo",value = "设备号")
    private String deviceInfo;

    @TableField(value="transaction_id")
    @ApiModelProperty(name="transactionId",value = "第三方支付平台订单号")
    private String transactionId;

    @TableField(value="pay_out_trade_no")
    @ApiModelProperty(name="payOutTradeNo",value = "商户订单号，交易订单号")
    private String payOutTradeNo;

    @TableField(value="pay_open_id")
    @ApiModelProperty(name="payOpenId",value = "用户标识，第三方平台open_id")
    private String payOpenId;

    @TableField(value="pay_type")
    @ApiModelProperty(name="payType",value = "交易类型 JSAPI--公众号支付、NATIVE--原生扫码支付、APP--app支付 MICROPAY--刷卡支付")
    private String payType;

    @TableField(value="pay_status")
    @ApiModelProperty(name="payStatus",value = "交易状态")
    private String payStatus;

    @TableField(value="pay_bank")
    @ApiModelProperty(name="payBank",value = "付款银行")
    private String payBank;

    @TableField(value="pay_money_type")
    @ApiModelProperty(name="payMoneyType",value = "货币类型 CNY：人民币 ")
    private String payMoneyType;

    @TableField(value="pay_total_money")
    @ApiModelProperty(name="payTotalMoney",value = "总金额--支付金额（元）")
    private BigDecimal payTotalMoney;

    @TableField(value="pay_coupons_money")
    @ApiModelProperty(name="payCouponsMoney",value = "优惠券金额（元）")
    private BigDecimal payCouponsMoney;

    @TableField(value="refund_id")
    @ApiModelProperty(name="refundId",value = "微信退款单号")
    private String refundId;

    @TableField(value="out_refund_no")
    @ApiModelProperty(name="outRefundNo",value = "商户退款单号")
    private String outRefundNo;

    @TableField(value="refund_money")
    @ApiModelProperty(name="refundMoney",value = "退款金额")
    private BigDecimal refundMoney;

    @TableField(value="refund_coupons_money")
    @ApiModelProperty(name="refundCouponsMoney",value = "优惠券退款金额")
    private BigDecimal refundCouponsMoney;

    @TableField(value="refund_type")
    @ApiModelProperty(name="refundType",value = "退款类型")
    private String refundType;

    @TableField(value="refund_status")
    @ApiModelProperty(name="refundStatus",value = "退款状态")
    private String refundStatus;

    @TableField(value="goods_name")
    @ApiModelProperty(name="goodsName",value = "商品名称")
    private String goodsName;

    @TableField(value="attach")
    @ApiModelProperty(name="attach",value = "第三方支付平台原样返回的商家数据包")
    private String attach;

    @TableField(value="poundage")
    @ApiModelProperty(name="poundage",value = "手续费")
    private BigDecimal poundage;

    @TableField(value="rate")
    @ApiModelProperty(name="rate",value = "费率")
    private String rate;

    @TableField(value="trade_bill_type")
    @ApiModelProperty(name="tradeBillType",value = "对账单类型，1:成功支付的订单；2:退款的订单")
    private Integer tradeBillType;

    @TableField(value="trade_bill_channel_id")
    @ApiModelProperty(name="tradeBillChannelId",value = "对账单渠道类型，1:微信")
    private Integer tradeBillChannelId;

    @TableField(value="trade_bill_create_time")
    @ApiModelProperty(name="tradeBillCreateTime",value = "对账单创建时间")
    private LocalDateTime tradeBillCreateTime;

    @TableField(value="trade_bill_update_time")
    @ApiModelProperty(name="tradeBillUpdateTime",value = "对账单更新时间")
    private LocalDateTime tradeBillUpdateTime;

    @TableField(value="remark")
    @ApiModelProperty(name="remark",value = "对账单备注")
    private String remark;


}